<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/ProductionSchedule/productionSchedule" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="productionSchedule" />
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel" />
            <label >产品方向：</label>
            <g:select name="text" from="${productionScheduleTextList}" data-toggle="selectpicker" data-width="130"
                      data-live-search="true" optionKey="text" optionValue="text" value="${text}"
                      noSelection="['':'-- All --']" />&nbsp;
            <label >订单号：</label>
            <input type="text" name="startDocId" placeholder="FROM" size="16" value="${startDocId}"/>
            <input type="text" name="endDocId" placeholder="TO" size="16" value="${endDocId}"/>&nbsp;
            <label >产品编码：</label>
            <input type="text" name="partName" value="${partName}" size="16" placeholder="产品编码"/>&nbsp;
            <label >规格型号：</label>
            <input type="text" name="spec1" value="${spec1}" size="16" placeholder="规格型号"/>
            <br /><br />
            <label >时间段：</label>
            <input type="text" name="startTime" value="${startTime}" data-pattern="yyyy-MM-dd" size="11" data-toggle="datepicker" placeholder="FROM">
            <input type="text" name="endTime" value="${endTime}" data-pattern="yyyy-MM-dd" size="11" data-toggle="datepicker" placeholder="TO">&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm','${request.getContextPath()}/ProductionSchedule/exportExcel')"
                    data-icon="file-excel-o" title="导出Excel">导出</button>
        </div>
    </form>
</div>
<div class="bjui-pageContent">
    <g:if test="${productionSchedule.size() > 0}">
        <table  data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr id="t1">
                <g:each in="${tableHeadList}" status="j" var="headInstance">
                    <g:if test="${headInstance!='RN'}">
                        <th width="100"><g:message code="${headInstance}" default="${headInstance}"/></th>
                    </g:if>
                </g:each>
            </tr>
            </thead>
            <tbody>
            <g:if test="${productionSchedule.size()>0}">
                <g:each in="${productionSchedule}" status="i" var="dataInstance">
                    <tr>
                        <g:each in="${tableHeadList}" status="j" var="headInstance">
                            <g:if test="${headInstance=='MAKE_QTY'}">
                                <td width="75" name="progressNormal${i+1}">
                                    <a href="${request.getContextPath()}/ProductionSchedule/productionScheduleTwo?docId=<%=dataInstance.DOC_ID%>" data-toggle="navtab"  data-id="dialog-normal" data-options="{id:'productionScheduleTwo', title:'生产订单在制品明细表二阶'}">${dataInstance["${headInstance}"] }</a>
                                </td>
                            </g:if>
                            <g:elseif test="${headInstance=='MAIN_QTY' || headInstance=='SHIP_QTY' || headInstance=='SCRAP_QTY' || headInstance=='MAKE_QTY' || headInstance=='DEFECT_COUNT'}">
                                <td width="75">${dataInstance["${headInstance}"]}</td>
                            </g:elseif>
                            <g:elseif test="${headInstance=='RESERVED1'}">
                                <td width="50">${dataInstance["${headInstance}"]}</td>
                            </g:elseif>
                            <g:elseif test="${headInstance!='RN'}">
                                <td width="100">${dataInstance["${headInstance}"]}</td>
                            </g:elseif>
                        </g:each>
                    </tr>
                </g:each>
            </g:if>
            </tbody>
        </table>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel" />
    </g:else>
</div>
<g:render template="../template/pagination" />